package com.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Service;

@Service
public class OrderService {
    @SentinelResource(value = "getOrder", blockHandlerClass = ExceptionHandle22.class, blockHandler = "flow")//對業務方法進行流控
    public String getOrder() {
//链路流控模式 多个controller 入口调用getOrder方法 对某个controller方法进行限流 让出对该方法的访问资源
        //service层对controller层进行流控  资源文件里配置 web-context-unify: false 收敛
        return "查询訂單";
    }

    public String creatOrder() {

        return "生成订单";
    }


}
